
#include "Child.h"
#include "ChildBoy.h"
#include "ChildGirl.h"
#include <memory>

using namespace npTemplateMethod;
using namespace std;


void doTemplateMethod()
{
    shared_ptr<Child> b = make_shared<ChildBoy>();
    b->doAll();
    shared_ptr<Child> g = make_shared<ChildGirl>();
    g->doAll();

    shared_ptr<Child> b2 = __cvt<Child>(b->clone());
    b2->doAll();
    shared_ptr<Child> b3 = __cvt<Child>(b->steal());
    b3->doAll();
}
